package com.cn.sl.server.api.system.department.dao.rdb.impl

import com.cn.sl.server.api.system.department.dao.rdb.DepartmentDao
import com.cn.sl.server.api.system.department.model.entity.DepartmentEntity
import com.cn.sl.server.api.system.department.model.entity.QDepartmentEntity
import com.cn.sl.server.api.system.department.repository.DepartmentRepository
import com.cn.sl.server.api.system.user.model.entity.AdminUserEntity
import com.cn.sl.server.common.dao.impl.SoftDeleteBaseDaoImpl
import com.cn.sl.server.common.model.QSoftDeleteEditableEntity
import org.springframework.stereotype.Repository

@Repository
class DepartmentDaoImpl(
    val departmentRepository: DepartmentRepository
) : DepartmentDao, SoftDeleteBaseDaoImpl<DepartmentEntity, DepartmentRepository, AdminUserEntity>() {
    override fun getRepository(): DepartmentRepository {
        departmentRepository
        return departmentRepository
    }

    override fun getEntity(): QSoftDeleteEditableEntity {
        return QDepartmentEntity.departmentEntity._super
    }
}